
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type ExpresRequest struct {

	Code string `json:"code" form:"code"`

	Name string `json:"name" form:"name"`

	PartnerId string `json:"partner_id" form:"partner_id"`

	PartnerKey string `json:"partner_key" form:"partner_key"`

	Net string `json:"net" form:"net"`

	CheckMan string `json:"check_man" form:"check_man"`

	PartnerName string `json:"partner_name" form:"partner_name"`

	IsCode string `json:"is_code" form:"is_code"`

	CourierName string `json:"courier_name" form:"courier_name"`

	CustomerName string `json:"customer_name" form:"customer_name"`

	CodeName string `json:"code_name" form:"code_name"`

	Account string `json:"account" form:"account"`

	Key string `json:"key" form:"key"`

	NetName string `json:"net_name" form:"net_name"`

	Sort string `json:"sort" form:"sort"`

	IsShow string `json:"is_show" form:"is_show"`

	Status string `json:"status" form:"status"`

}

func (r *ExpresRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *ExpresRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"code": "required",

		"name": "required",

		"partner_id": "required",

		"partner_key": "required",

		"net": "required",

		"check_man": "required",

		"partner_name": "required",

		"is_code": "required",

		"courier_name": "required",

		"customer_name": "required",

		"code_name": "required",

		"account": "required",

		"key": "required",

		"net_name": "required",

		"sort": "required",

		"is_show": "required",

		"status": "required",

	}
}

func (r *ExpresRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *ExpresRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *ExpresRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
